#include <iostream>
#include<unordered_set>
using namespace std;

int cha(unsigned int&a)
{
	int re1 = 0;
	for (int i = 0; i < 32; i++)
	{
		if (a & 1) { re1++; }
		a = a >> 1;
	}
	return re1;
}

int main()
{
	unsigned int x;
	int re1,re0,re;
	re1 = 0;
	re0 = 0;
	for (int i = 0; i < (int)1e4; i++)
	{
		scanf("%d", &x);
		re	= cha(x);
		re1 += re;
		re0 += (32 - re);
			
	}
	if (abs(re1 - re0) > 100000)
	{
		printf("A");
	}
	else{ printf("B"); }
	return 0;
}